/*package com.shankungfu.fragment;

import java.util.List;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.RelativeLayout;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.alibaba.fastjson.JSON;
import com.loopj.android.http.AsyncHttpResponseHandler;
import com.loopj.android.http.RequestParams;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer;
import com.shankungfu.GlobleConstant;
import com.shankungfu.R;
import com.shankungfu.adapter.PickItemAdapter;
import com.shankungfu.adapter.PublicInformationAdapter;
import com.shankungfu.bean.CharityNewsDataBean;
import com.shankungfu.bean.ReportBean;
import com.shankungfu.main.PublicInformationDetailActivity;
import com.shankungfu.util.MyAsyncHttpResponseHandler;
import com.shankungfu.util.TestUtils;
import com.shankungfu.util.ToastUtil;
import com.shankungfu.util.WebService;

*//** 
 * 应 需求方的要求，这个暂时去除掉，
 * @author WangQing
 *
 *//*
public class PublicInformationFragment extends Fragment implements
		OnItemClickListener, OnClickListener {
	private ListView publicListView;
	private List<CharityNewsDataBean> list;
	private PublicInformationAdapter adapter;
	private DisplayImageOptions options;
	private RelativeLayout progressBar;

	private static final int data_success = 1;
	private static final int no_data = 2;

	private Handler handler = new Handler() {

		@Override
		public void handleMessage(Message msg) {
			super.handleMessage(msg);
			switch (msg.what) {
			case data_success:
				// 显示公益资讯列表
				adapter.setData(list);
				adapter.notifyDataSetChanged();
				break;
			case no_data:
				// 显示公益资讯列表没有信息的界面
				break;

			default:
				break;
			}

		}

	};

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		View v = inflater.inflate(R.layout.public_information_layout, null);

		initView(v);
		updateForData();
		getData();

		return v;
	}

	private void initView(View v) {
		publicListView = (ListView) v.findViewById(R.id.public_information);
		progressBar = (RelativeLayout) v.findViewById(
				R.id.progressBar);

		publicListView.setOnItemClickListener(this);

		options = new DisplayImageOptions.Builder()
				.showImageOnLoading(R.drawable.default_icon)
				.showImageForEmptyUri(R.drawable.default_icon)
				.showImageOnFail(R.drawable.default_icon).cacheInMemory(true)
				.cacheOnDisc(true).considerExifParams(true)
				.displayer(new RoundedBitmapDisplayer(2)).build();

		adapter = new PublicInformationAdapter(getActivity(), options);
		publicListView.setAdapter(adapter);

	}

	private void getData() {
		WebService httpclient = new WebService();
		RequestParams params = new RequestParams();
		params.add("serviceId", "charity_news");
		params.add("app_info", "shankungfu");
		params.add("page", "1");
		
		AsyncHttpResponseHandler responseHandler = new MyAsyncHttpResponseHandler() {
			@Override
			public void onSuccess(String content) {
				getSuccessData();
				if (!TextUtils.isEmpty(content)) {
					ReportBean resportBean = JSON.parseObject(content,
							ReportBean.class);

					int result = Integer.valueOf(resportBean.getResult());
					if (result != 0) {
						handler.sendEmptyMessage(no_data);
						return;
					}

					ReportBean reportBean = JSON.parseObject(content,
							ReportBean.class);
					list = reportBean.getCharityNewsData();
					handler.sendEmptyMessage(data_success);
				}
			}

			@Override
			public void onFailure(String content) {
			}
		};
		httpclient.request(GlobleConstant.REPORT_ADD, params, responseHandler);
	}

	private void updateForData() {
		progressBar.setVisibility(View.VISIBLE);
	}

	private void getSuccessData() {
		progressBar.setVisibility(View.GONE);
	}

	@Override
	public void onItemClick(AdapterView<?> parent, View view, int position,
			long id) {

		Intent intent = new Intent(getActivity(),
				PublicInformationDetailActivity.class);
		startActivity(intent);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.head_refresh:
			updateForData();
			getData();
			break;
		}

	}

}
*/